Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc/git-workflow.md: Rewritten based on new experience #835

Merged
merged 8 commits into from
Jul 13, 2016

Conversation

lukego
Copy link
Member

@lukego lukego commented Mar 18, 2016

I rewrote the git-workflow explanation with the goal of briefly but clearly explaining both how to submit a change to Snabb Switch and also how to be a subsystem maintainer.

This is intended to be a chapter in the manual. I marked [wip] because I haven't written the section about how to send your merged changes further upstream yet.

cc @eugeneia @wingo @kbara what do you think of this as a summary of our recent discussions and experiences?

I rewrote the git-workflow explanation with the goal of briefly but
clearly explaining both how to submit a change to Snabb Switch and
also how to be a subsystem maintainer.

This is intended to be a chapter in the manual.
its development.
1. Pick your technical area of interest. What kind of changes will you be responsible for reviewing and merging? Try to pick an area that is easy to identify, for example "the packetblaster program", "the Intel I350 device driver", or "the Git Workflow chapter of the manual".
2. Create a branch with a suitable name on your Github fork, for example `packetblaster`, `i350`, or `git-workflow`. This is where you will merge relevant changes.
3. Describe this branch in the file `src/doc/branches.md` and open a Github Pull Request. This will kick off two discussions: how to clearly identify the changes that you are responsible for, and to which "next-hop" upstream branch you should send the changes that you have accepted by merging.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to know the branch name to open Github Pull Request to start with. master?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't figured that out completely yet. I think in most cases the PRs should be against master, then again some PRs only make sense targeting a specific branch (e.g. PRs related to the IPsec topic branch for instance). I have to update SnabbBot to merge PRs with their target branch instead of a fixed branch (master in our case) for the latter case to work well.

I think to remember that @wingo thinks we should use the target branch to designate the next upstream hop. I don't think this is a good idea because contributors shouldn't be required to know who the next hop is, and if its not the right hop then I think its hard to rectify without closing/opening a new PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nix branch should have a well-defined upstream next-hop where @domenkozar sends his Pull Requests. We maintainers should pick one as part of accepting #836.

I propose that nix feeds upstream to kbara-next. what do you think @kbara and others?

This process is supposed to be explained in point 3 of the text quoted above about updating branches.md. How should we make that clearer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: There are two separate processes both in this document and in actual practice. One is for making an individual contribution, such as a new feature or a bug fix, and one is for sending a subsystem branch upstream, e.g. merging the nix branch with its upstream next-hop.

The document is supposed to clearly explain that there are two processes, one for contributors and one for maintainers, and to spell out the details of each. Obviously it is not doing so perfectly :). How could we improve it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there should be a section at beginning explaining the difference between the two so the reader chooses which part to read?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to be the upstream for the nix tributary.

@eugeneia
Copy link
Member

👍 Teeny tiny concern: people might expect to find a drivers branch and wonder what <person-next> branches are about, or even next. Imho this should document the whole picture of the current situation, and be updated accordingly when things establish.

I see minor overlap with #761, or at least this should be linked to from CONTRIBUTING.md.

@lukego
Copy link
Member Author

lukego commented Mar 20, 2016

@eugeneia Good point. How about if we start maintaining a map of the current branches and then refer to that where appropriate?

Here is a first attempt and using a little creative license in terms of content:

x

Source for ditaa:

                                   +--lisper
                   +--max next<----+--documentation<--pdf manual
                   |
       fixes       |
         |         |
master<--+--next<--+--kbara next<--+--nix
                   |               +--mellanox
                   |
                   |
                   +--wingo next<--+--lwaftr
                                   +--multiproc

lukego added 2 commits March 21, 2016 06:00
Contains "XXX rewrite" where old sections have been removed but
replacements not written yet.
This file now contains a diagram so it needs to have separate .src.md
and .md versions. This can be cleaned up when these changes eventually
merge with the on-demand markdown (snabbco#829).
@lukego
Copy link
Member Author

lukego commented Mar 21, 2016

Thanks @domenkozar @eugeneia for the feedback. I have the feeling that the first redraft I submitted was not explaining things very clearly. I have pushed another partial rewrite now (half complete, half missing). Are there some parts that are less clearly explained than others now?

I also know that I have a tendency to overuse analogies when trying to elucidate the Git workflow (sorry @wingo...) but I can't look at our branch structure now without thinking of master as a river and the subsystem branches as tributary streams, like in this map from the Wikipedia page about the source of the Rhine river. Is this worth talking about in the text or would it just be distracting?

@lukego
Copy link
Member Author

lukego commented Mar 21, 2016

I pushed a new section about how to be an upstream maintainer. I would really like feedback/ack/nack on this from the existing maintainers. cc @eugeneia @wingo @kbara.

lukego added a commit to lukego/snabb that referenced this pull request Mar 21, 2016
Added note to branches.md that branch 'nix' feeds upstream to
'kbara-next' following ack from kbara on snabbco#835.
@kbara
Copy link
Contributor

kbara commented Mar 21, 2016

It looks good, though the next-hop part needs filling in. I think that's currently the fuzziest part of the whole workflow to me.

also stopped capitalizing "Pull Request" because it seemed awkward.
@lukego
Copy link
Member Author

lukego commented Mar 22, 2016

@kbara Thanks for the feedback! I have written and pushed the next-hop section now. I am sure it is missing a lot of information. Can you tell me how it looks and what is still not clear?

Generally I think that having a well-defined branch tree is the key to making upstreaming work smoothly. This is hard now in the early days because we have so few branches and maintainers. Going forward it seems like if new features are first merged onto an appropriate subsystem branch (e.g. nix, mellanox, pdf-manual, etc) and then make their way up the tree (being sanity-checked and conflict-resolved at each step) then it should be easy to coordinate development.

The hope is that this maintenance structure will be scalable i.e. that we can get more useful work done by adding more maintainers. The barrier of entry to becoming a maintainer should be fairly low because the tree above acts as a safety net and mentoring framework. This seems to be how it works in the Linux kernel world.

One aspect I have not touched on in the documentation is having additional upstream communities around another Github fork e.g. the one on igalia/snabbswitch. This seems like an important mechanism for long term scalability since the rate of notifications from snabbco/snabbswitch is likely to become overwhelming at some point and it will be better to localize specific subsystems to their own repositories. I see a parallel where the Linux Kernel Mailing List was enough in the early days but can't keep up with all the discussions anymore and so these days there are around a hundred more specific mailing lists.

However, I feel that it would be premature to promote wide adoption of that model just yet. I tried creating a separate snabbnfv-goodies repository for the NFV application and that seems to have been counter-productive compared with working directly on this upstream repository because it reduced visibility of the development without commensurate benefits in that particular case.

@lukego lukego changed the title [wip] doc/git-workflow.md: Rewritten based on new experience doc/git-workflow.md: Rewritten based on new experience Apr 29, 2016
@lukego
Copy link
Member Author

lukego commented Apr 29, 2016

Ready for upstreaming, please!


This document explains the Git workflows that we use to develop and
release Snabb Switch.
How do you engage with the Snabb Switch developer community? The answer depends on what you want to do:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still uses the name "snabb switch", fwiw, here and below; not a blocker but FYI

@lukego lukego mentioned this pull request Apr 29, 2016
@kbara kbara self-assigned this Apr 29, 2016
@kbara
Copy link
Contributor

kbara commented Apr 29, 2016

Is it intentional that this contains both git-workflow.md and git-workflow.src.md?

@eugeneia
Copy link
Member

I believe this is in need of manual merge conflict resolution.

lukego added 2 commits May 2, 2016 04:28
Resolved conflicts with incoming changes from master branch:

*.src.md replaced with simply *.md

"Snabb Switch" being renamed to "Snabb"
Ditaa images are not kept in tree anymore...
@lukego
Copy link
Member Author

lukego commented May 2, 2016

Have merged master and resolved conflicts now. The overall diff seems to reflect only the intended changes against current master.

@eugeneia
Copy link
Member

eugeneia commented May 2, 2016

For some reason this PR doesn't show up in https://api.github.com/repos/snabbco/snabb/pulls and therefore is invisible for SnabbBot. I will try to close and reopen it just to see what happens.

@eugeneia eugeneia closed this May 2, 2016
@eugeneia eugeneia reopened this May 2, 2016
@eugeneia
Copy link
Member

eugeneia commented May 3, 2016

Figured it out, see #910

kbara pushed a commit that referenced this pull request Jun 22, 2016
@kbara kbara added the merged label Jun 22, 2016
@kbara
Copy link
Contributor

kbara commented Jun 22, 2016

Merged, belatedly!

@kbara kbara mentioned this pull request Jun 28, 2016
@eugeneia eugeneia merged commit 6c46b5d into snabbco:master Jul 13, 2016
dpino pushed a commit to dpino/snabb that referenced this pull request Jun 19, 2017
This adds support for YANG's choice statement (RFC6020 Section 7.9)
which allows for validation when two blocks can be specified exclusively.

The choice block is unique in a few ways and requires the introduction of
a new grammar handler. The choice statement is only there for configuration
purposes and should not appear itself in the data so it requires some
changes allowing for the defined "case" data to essencially replace the
choice statement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants